package com.imooc.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Value;

@RestController
@RequestMapping("w")
public class HelloController {

    @GetMapping("hello")
    public String hello() {
        return "hello work service ~ ~";
    }

    @Value("${server.port}")
    private String port;

    @GetMapping("port")
    public String port() {
        return "hello work service ~ ~ port = " + port;
    }

}
